/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface MsgNotify extends BasicModel<MsgNotify> {
  msgTitle?: string; // 标题
  msgContent?: string; // 内容
  receiveType?: string; // 消息类型
  receiveCodes?: string; // 接收人编码
  receiveNames?: string; // 接收人名称
  sendUserCode?: string; // 发送人编码
  sendUserName?: string; // 发送人名称
  sendDate?: string; // 发送时间
  startDate?: string; // 开始时间
  endDate?: string; // 结束时间
  msgNotifyRecordList?: any[]; // 子表列表
}

export const msgNotifyList = (params?: MsgNotify | any) =>
  defHttp.get<MsgNotify>({ url: adminPath + '/msg/msgNotify/list', params });

export const msgNotifyListData = (params?: MsgNotify | any) =>
  defHttp.post<Page<MsgNotify>>({ url: adminPath + '/msg/msgNotify/listData', params });

export const msgNotifyForm = (params?: MsgNotify | any) =>
  defHttp.get<MsgNotify>({ url: adminPath + '/msg/msgNotify/form', params });

export const msgNotifySave = (params?: any, data?: MsgNotify | any) =>
  defHttp.postJson<MsgNotify>({ url: adminPath + '/msg/msgNotify/save', params, data });

export const msgNotifyDelete = (params?: MsgNotify | any) =>
  defHttp.get<MsgNotify>({ url: adminPath + '/msg/msgNotify/delete', params });

export const updateStatus = (params?: MsgNotify | any) =>
  defHttp.get<MsgNotify>({ url: adminPath + '/msg/msgNotify/updateStatus', params });
